package net.funwoo.pandago.ui.main;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import net.funwoo.pandago.R;
import net.funwoo.pandago.adapter.PersonMenuAdapter;
import net.funwoo.pandago.ui.BaseFragment;
import net.funwoo.pandago.widget.MenuDecoration;

/**
 * Created by Bob Peng on 2015/5/7.
 */
public class PersonFragment extends BaseFragment implements View.OnClickListener {
    public static final String TAG = "person";
    private PersonMenuAdapter mAdapter;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_person, container, false);
        RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.person_menu_list);
        mAdapter = new PersonMenuAdapter(getContext());
        recyclerView.setAdapter(mAdapter);
        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        recyclerView.addItemDecoration(new MenuDecoration(getContext(), MenuDecoration.VERTICAL_LIST));
        recyclerView.setHasFixedSize(true);
        return view;
    }

    @Override
    public void onClick(View v) {

    }
}
